<%-- 
    Document   : listSpecialist
    Created on : 29 Oct, 2012, 6:46:59 PM
    Author     : santosh
--%>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="../common/script.jsp" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@include file="../common/title.jsp" %>
        <script type="text/javascript">
            $(function() {
                $( "#hospitalId" ).autocomplete({
                    source: "../ajaxCallForHospitalListForSpecialist.htm",
                    minLength: 1    
                });
            });
        </script>

    </head>
    <body>
        <%@include file="../common/header.jsp" %>
        <%@include file="../common/menu.jsp" %>

        <div class="in_02">
            <form id="form1" method="post">
                <fieldset style="width: auto; height: 80px">
                    <legend>Select options</legend>
                    <table class="formTable">
                        <tr>
                            <td>Specialist type:<br/><select id="specialistTypeId" name="specialistTypeId" class="userInputLarge">
                                    <option value="0">All</option>
                                    <c:forEach items="${specialistTypeList}" var="item">
                                        <option <c:if test="${specialistTypeId==item.specialistTypeId}">selected</c:if> value="${item.specialistTypeId}">
                                            ${item.specialistType}
                                        </option>
                                    </c:forEach>
                                </select>
                            </td>
                            <td><spring:message code="selectZone"/>:<br/>
                                <select id="zoneId" name="zoneId"  class="userInputLarge">
                                    <option value="0" >All</option>
                                    <c:forEach items="${zoneList}" var="zoneItem">
                                        <option <c:if test="${zoneId==zoneItem.zoneId}">selected</c:if> value="${zoneItem.zoneId}">${zoneItem.zoneName}</option>
                                    </c:forEach>
                                </select>
                                <br/><span id="errorsDiv_zoneId"></span>
                            </td>
                            <td>
                                <p><label>Hospital Name:</label><br />
                                    <input type="text" name="hospitalId" id="hospitalId" value="${hospitalName}" class="userInputLarge"  />
                            </td>
                            <td><br/><input type="submit" value="Go" name="Go"></td>
                        </tr>
                    </table>
                </fieldset>
            </form>
            <form> 
                <%@include file="../common/message.jsp" %>
                <br/> &nbsp;&nbsp;&nbsp;
                <sec:authorize ifAnyGranted="ROLE_BF_SPECIALIST_ADD">
                    <span style="font-size: 15px; font-weight: bold;"><a href="../specialist/addSpecialist.htm">Add specialist</a></span>
                </sec:authorize>
                <br/><br/>
                &nbsp;&nbsp;&nbsp;&nbsp;<strong ><spring:message code="title.listSpecialist"/></strong>
                <p style="float: right;padding-right: 50px;"><c:out value="${fn:length(filterSpecialist)}"/> <spring:message code="rowsFound"/></p>
                <table class="data_table" border="1px">
                    <thead>
                        <tr class="header">
<!--                            <td><spring:message code="specialistId"/></td>-->
                            <th width="150px"><spring:message code="specialistName"/></th>
                            <th width="100px"><spring:message code="specialistTypeId"/></th>
                            <th width="120px"><spring:message code="mobile"/></th>
                            <th width="150px"><spring:message code="email"/></th>
                            <th width="200px"><spring:message code="hospitalName"/></th>
                            <th width="100px"><spring:message code="contact"/></th>
                            <th width="150px"><spring:message code="timing1"/></th>
                            <th width="100px"><spring:message code="masterZoneCode"/></th>
                            <th width="100px"><spring:message code="area"/></th>
                            <sec:authorize ifAnyGranted="ROLE_BF_SPECIALIST_EDIT">
                                <th width="20px">&nbsp;</th>
                            </sec:authorize>
                        </tr>
                    </thead>
                    <c:forEach items="${filterSpecialist}" var="specialistItem">
                        <tr>
<!--                            <td align="center"><c:out value="${specialistItem.SPECIALIST_ID}"/></td>-->
                            <td align="center"><c:out value="${specialistItem.NAME}"/></td>
                            <td align="center"><c:out value="${specialistItem.SPECIALIST_TYPE}"/></td>
                            <td align="center"><c:out value="${specialistItem.MOBILE}"/></td>
                            <td align="center"><c:out value="${specialistItem.EMAIL}"/></td>
                            <td align="center"><c:out value="${specialistItem.HOSPITAL_NAME}"/></td>
                            <td align="center"><c:out value="${specialistItem.CONTACT}"/></td>
                            <td width="220px"><c:out value="${specialistItem.TIMING_1}"/></td>
                            <td align="center"><c:out value="${specialistItem.MASTER_ZONE_CODE}"/></td>
                            <td align="center"><c:out value="${specialistItem.ZONE_NAME}"/></td>
                            <sec:authorize ifAnyGranted="ROLE_BF_SPECIALIST_EDIT">
                                <td><a href="editSpecialist.htm?specialistId=<c:out value="${specialistItem.SPECIALIST_ID}"/>"><img src="../images/edit.png"  width="20" height="20" style="border: none" alt="Edit" title="Edit"/></a></td>
                                    </sec:authorize>
                        </tr>
                    </c:forEach>
                </table>
                &nbsp;&nbsp;&nbsp;&nbsp;<c:out value="${fn:length(filterSpecialist)}"/> <spring:message code="rowsFound"/>
                <br/><br/> &nbsp;&nbsp;&nbsp;
                <sec:authorize ifAnyGranted="ROLE_BF_SPECIALIST_ADD">
                    <span style="font-size: 15px; font-weight: bold;"><a href="../specialist/addSpecialist.htm">Add specialist</a></span>
                </sec:authorize>
            </form>
        </div>
    </body>
</html>
